# Maintainer: Morten Linderud <foxboron@archlinux.org>
# Contributor: Adrian Perez de Castro <aperez@igalia.com>

pkgdesc='FUSE implementation of overlayfs'
pkgname=fuse-overlayfs
pkgver=1.11
pkgrel=1
arch=(loong64 x86_64)
url=https://github.com/containers/fuse-overlayfs
license=(GPL3)
depends=(fuse3)
makedepends=(git)
_commit=68c31d14b020d0df9288d09181e9c8ca1889a967	#refs/tags/v1.11^{}
source=("git+https://github.com/containers/fuse-overlayfs.git#commit=$_commit?signed")
validpgpkeys=('AC404C1C0BF735C63FF4D562263D6DF2E163E1EA')
sha512sums=('SKIP')

pkgver() {
	cd "${pkgname}"
	git describe --tags | sed 's/^v//;s/-/+/g'
}

build () {
	cd "${pkgname}"
	autoreconf -fis
	./configure \
		--prefix=/usr \
		--sbindir=/usr/bin
	make
}

check(){
	cd "${pkgname}"
	make check
}

package (){
	cd "${pkgname}"
	make DESTDIR="${pkgdir}" install
}
